﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace WindowsFormsApp1
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void Form1_Load(object sender, EventArgs e)
        {
            List<Color> colors = new List<Color>();

            colors.Add(Color.Pink);
            colors.Add(Color.Red);
            colors.Add(Color.Yellow);
            colors.Add(Color.SkyBlue);

            Random random = new Random();
            var randInt = random.Next(0, colors.Count);

            var randColor = colors[randInt];

            BackColor = randColor;
        }
    }
}
